package com.lifp.controller;

import com.lifp.annotation.HasRole;
import com.lifp.vo.Result;
import org.springframework.web.bind.annotation.*;

/**
 * @Description TODO
 * @Author lfp
 * @Date 2023/6/2
 * @Version 1.0
 */
@RestController
@RequestMapping("role")
public class UserRoleTestController {

    @GetMapping("qeuery")
    public Result noAnno(@RequestParam String userName){
        return Result.succeed("success");
    }

    @GetMapping("anno/qeuery")
    @HasRole("admin")
    public Result<String> annoQuery(@RequestParam String userName){
        return Result.succeed("success");
    }
}